package roy.abc.study.WebServices.JavaWSUpAndRunning.ch01.ts;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TimeClient {
	private static Logger logger = LoggerFactory.getLogger(TimeClient.class);
	
	public static void main(String[] args) throws Exception{
		URL url = new URL("http://localhost:9876/ts?wsdl");
		
		QName qname = new QName("http://ts.ch01.JavaWSUpAndRunning.WebServices.study.abc.roy/",
								"TimeServerImplService");
		
		Service service = Service.create(url, qname);
		
		TimeServer eif = service.getPort(TimeServer.class);
		
		logger.debug("getTimeAsElapsed(): " + eif.getTimeAsElapsed());
		logger.debug("getTimeAsString() : " + eif.getTimeAsString());
	}
}
